home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / gb2 / patch3 < prev   
Encoding:
Internet Message Format  |  1989-10-02  |  4.2 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i036:  GB2 - Galactic Bloodshed, an empire-like war game [Ver. 1.0], Patch3
  5. Message-ID: <4604@tekred.CNA.TEK.COM>
  6. Date: 21 Sep 89 13:33:07 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 125
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: VANCLEEF@mps.ohio-state.edu
  12. Posting-number: Volume 8, Issue 36
  13. Archive-name: GB2/Patch3
  14. Patch-To: GB2: Volume 7, Issue 44-51
  15.  
  16.     [This fixes a logic error in doplanet.c and adds a missing
  17.      close() in files_shl.c and properly updates patchlevel.h]
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of shell archive."
  26. # Contents:  patches03
  27. # Wrapped by billr@saab on Thu Sep 21 06:40:42 1989
  28. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  29. if test -f 'patches03' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'patches03'\"
  31. else
  32. echo shar: Extracting \"'patches03'\" \(2665 characters\)
  33. sed "s/^X//" >'patches03' <<'END_OF_FILE'
  34. XPatch2 inadvertantly did not update the patchlevel.h file, so
  35. Xeven though this looks wrong it is correct.-br
  36. X*** ../../GB2/patchlevel.h    Fri Sep 15 08:45:12 1989
  37. X--- patchlevel.h    Thu Sep 21 06:37:16 1989
  38. X***************
  39. X*** 1 ****
  40. X! #define PATCHLEVEL    1
  41. X--- 1 ----
  42. X! #define PATCHLEVEL    3
  43. X*** ../../GB2/doplanet.c    Mon Sep 18 06:35:57 1989
  44. X--- doplanet.c    Thu Sep 21 06:30:04 1989
  45. X***************
  46. X*** 332,337 ****
  47. X--- 332,340 ----
  48. X  
  49. X  while (Getxysect(planet, &x, &y, 0)) {
  50. X         p = &Sector(*planet,x,y);
  51. X+ /* wasted sectors have a 1% chance/turn of repairing themselves
  52. X+     from natural effects */
  53. X+     if(p->is_wasted && !int_rand(0,99))p->is_wasted = 0;
  54. X         if (p->amoeba) {
  55. X          planet->info[1-1].numsectsowned++;
  56. X          allamoeba &= 1;
  57. X***************
  58. X*** 622,628 ****
  59. X           /* slave revolt! */
  60. X      printf("slave revolt!\n");
  61. X           /* first nuke some random sectors from the revolt */
  62. X!         i = planet->popn / 10000 + 1;
  63. X      printf("i %d  Maxx %d  Maxy %d\n",i,planet->Maxx,planet->Maxy);
  64. X          while (--i) {
  65. X              p = &Sector(*planet,int_rand(0,planet->Maxx-1),
  66. X--- 625,631 ----
  67. X           /* slave revolt! */
  68. X      printf("slave revolt!\n");
  69. X           /* first nuke some random sectors from the revolt */
  70. X!         i = planet->popn / 1000 + 1;
  71. X      printf("i %d  Maxx %d  Maxy %d\n",i,planet->Maxx,planet->Maxy);
  72. X          while (--i) {
  73. X              p = &Sector(*planet,int_rand(0,planet->Maxx-1),
  74. X***************
  75. X*** 698,700 ****
  76. X--- 701,704 ----
  77. X   }
  78. X   return allmod;
  79. X  }
  80. X+ 
  81. X*** ../../GB2/files_shl.c    Fri Sep 15 08:44:27 1989
  82. X--- files_shl.c    Thu Sep 21 06:33:55 1989
  83. X***************
  84. X*** 365,373 ****
  85. X  
  86. X    shipno = shipnum;    /* conv to u_short */
  87. X  
  88. X!  if(shipnum == 0)return;
  89. X  
  90. X    if ( (fd = open(SHIPFREEDATAFL, O_WRONLY, 0777)) < 0) {
  91. X        perror("openshfdata");
  92. X        printf("unable to open %s\n",SHIPFREEDATAFL);
  93. X        exit(-1);
  94. X--- 365,375 ----
  95. X  
  96. X    shipno = shipnum;    /* conv to u_short */
  97. X  
  98. X!  if(shipno == 0)return;
  99. X  
  100. X    if ( (fd = open(SHIPFREEDATAFL, O_WRONLY, 0777)) < 0) {
  101. X+     printf("fd = %d \n",fd);
  102. X+     printf("errno = %d \n",errno);
  103. X        perror("openshfdata");
  104. X        printf("unable to open %s\n",SHIPFREEDATAFL);
  105. X        exit(-1);
  106. X***************
  107. X*** 376,384 ****
  108. X    printf("ship #%u destroyed.\n", shipno);
  109. X      /* write the ship # at the very end of SHIPFREEDATAFL */
  110. X    fstat(fd,&buf);
  111. X!     Locks(1);
  112. X    Filewrite(fd,(char *)&shipno, sizeof(shipno), SHIPFREEDATAFL, buf.st_size );
  113. X      Locks(0);
  114. X  }
  115. X  
  116. X  
  117. X--- 378,387 ----
  118. X    printf("ship #%u destroyed.\n", shipno);
  119. X      /* write the ship # at the very end of SHIPFREEDATAFL */
  120. X    fstat(fd,&buf);
  121. X!     Locks(1); 
  122. X    Filewrite(fd,(char *)&shipno, sizeof(shipno), SHIPFREEDATAFL, buf.st_size );
  123. X      Locks(0);
  124. X+     close(fd);
  125. X  }
  126. X  
  127. X  
  128. END_OF_FILE
  129. if test 2665 -ne `wc -c <'patches03'`; then
  130.     echo shar: \"'patches03'\" unpacked with wrong size!
  131. fi
  132. # end of 'patches03'
  133. fi
  134. echo shar: End of shell archive.
  135. exit 0
  136.